#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    FILE* ret = fopen("c:\\execution.txt", "w" ) ;
    if (argc >= 3) {
        char command2[1000];
        strcat(command2, "java -cp \"");
        strcat(command2, argv[2]);
        strcat(command2, "\";\"");
        strcat(command2, argv[1]);
        strcat(command2, "\" ");
        strcat(command2, argv[3]);
        strcat(command2, " \0");
        fprintf(ret, "%s \n", command2);
        fflush(ret); 
        system(command2);
        return EXIT_SUCCESS;
    } else {
        return -1;
    } 
}
